package com.finance.cooperate.dao.repository.secondary;

import com.finance.cooperate.dao.entity.secondary.FraudAppInstallDetail;
import com.finance.cooperate.dao.support.dto.ScrapyAppCategoriesDTO;
import com.finance.cooperate.dao.support.jpa.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @InterfaceName FraudAppInstallDetailRepository
 * @Description TODO
 * @Author shenanxin
 * @Date 2023/8/23 16:14
 * @Modify ...
 */
@Repository
public interface FraudAppInstallDetailRepository extends BaseRepository<FraudAppInstallDetail, Long> {



    /**
    * @Author shenanxin
    * @Description 筛选出符合数据
    * @Date 10:39 2023/9/13
    * @Param [installTimeList, packageName, appPackageNameList, beginTime, lastTime]
    * @return java.util.List<com.finance.cooperate.dao.entity.secondary.FraudAppInstallDetail>
    **/
    @Query(value = "SELECT * FROM rc_fraud_app_install_detail WHERE install_time IN ?1 AND package_name = ?2 AND app_package_name IN ?3 AND created BETWEEN ?4 AND ?5", nativeQuery = true)
    List<FraudAppInstallDetail> findByCondition(List<Long> installTimeList, String packageName, List<String> appPackageNameList, Long beginTime, Long lastTime);


}
